<?php
/**
 *============================================================================
 * Cornice PHP Framework & Website Builder
 * Freeware (f) 2011 by Inforo Software & Computers
 *============================================================================
 */

//load extended functions----------------------------------------------------- 
$global = "libs/extensions/global.php";
require_once($global);
 
//load system-----------------------------------------------------------------
$system = "classes/core/statics/system.php";
require_once($system);

//faster rendering with $devmode = false
error_reporting(E_ALL); //saves many mistakes
set_error_handler("error_handler"); //catch all, even notices
ini_set("display_errors","On"); //just in case php.ini disable this
system::$devmode = true; //for dev features

//load classes & render webpage-----------------------------------------------
system::load_core_classes(); //Cornice's core classes
system::load_custom_classes(); //added-in classes by dev
system::initialise_all(); //warm up core classes
system::check_security(); //check module accessibility
system::check_preferences(); //user's skin & language
system::render_webpage(); //actual HTML rendering

//all done
if (system::$devmode)
  phrase::save_all();

//end of default php file
//============================================================================